package com.test.service.impl;

import com.test.mapper.PersonMapper;
import com.test.model.Person;
import com.test.service.PersonService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class PersonServiceImpl implements PersonService {
    @Resource
    private PersonMapper personMapper;

    @Transactional
    @Override
    public int savePerson(Person person) {
        int i = 1 / 0;

        return personMapper.insert(person);
    }
}
